/**************************************************************************
 * @doc PIP
 * @module isodefs.h |
 * Defines for ISO & PIP Modules
 *
 * Product     :   SoftPay 2000 (Global Payment Methodology).
 * <nl>Developer   : Monique Brown
 * <nl>Notes       :
 *
 * @head3 PIP & ISO Defines |
 * @index | PIP
 * @end
 *
 * Copyright (c) 1996-2000 by VeriFone Inc. All rights reserved.
 *
 * No part of this software may be used, stored, compiled, reproduced,
 * modified, transcribed, translated, transmitted, or transferred, in any form
 * or by any means whether electronic, mechanical, magnetic, optical,
 * or otherwise, without the express prior written permission of VeriFone, Inc.
 *
 * Revision History
 * ------------------------------------------------------------------------
 * $log:  $
 * ------------------------------------------------------------------------
 ********************************************************************************/

#define ISOBMP_FNAME ".BMP"
#define PIP_MESSAGE_FILE  "pip"
#define BITMAP_STRING_SIZE		16
#define MTI_STRING_SIZE			4
#define PROC_CODE_STRING_SIZE	6

#define ISO_DATA_SIZE      sizeof(ISO_DATA)

#define ISO_RCV_SIZE 		   200
//#define MTI_SIZE                2        /* Message type identifier size */
#define TPDU_SIZE               11       /* Trnsprt protocol data unit     */

#define BCD_LNG                 15    /* New entry in the converter Table. */
#define BCD_INT                 16    /* New entry in the converter Table. */
#define BF2_STR                 17    /* New entry in the converter Table. */
#define BI3_BI3                 18
#define BIT_MAP_SIZE            8
#define PACK                    0
#define UNPACK                  1

#define PIP_APPROVAL            1
#define A_NONE                  0x0000
#define A_CASH                  0x0008
#define A_VOID_AUTH             0x0000
#define A_BALANCE               0x0008
#define A_ADMIN                 0x0008

#define REVERSAL_TRANS          35

#define ORIG_MSG_SIZE           40

#define ENCRYPTION_KEYS_FIELD   62

#define TR_NO_FIELD             -17
#define TR_REQSIZE_ERR          -18
#define TR_RESPSIZE_ERR         -19
#define TR_VARSIZE_ERR          -20
#define TR_VARIANT_ERR          -21

#define MANUAL_POS_DEBIT_ENTRY_CODE   "011"
#define SWIPE_POS_DEBIT_ENTRY_CODE    "021"
#define MANUAL_POS_ENTRY_CODE   "012"
#define SWIPE_POS_ENTRY_CODE    "901"
#define SWIPE_POS_ENTRY_CODE_NON_EMV  "022"


#define TABLE(name)             (void *)name, 0
#define FUNCTION(name)          (void *)name, 0
#define VARIABLE(name)          (void *)name,sizeof(name)

/* ISO Field Sizes */
#define FIELD02_SIZE	19               // @comm #define FIELD02_SIZE	- 19
#define FIELD03_SIZE	24               // @comm #define FIELD03_SIZE	- 24
#define FIELD04_SIZE	12               // @comm #define FIELD04_SIZE	- 12
#define FIELD05_SIZE    2    		 	 // @comm #define FIELD05_SIZE  - 2
#define FIELD07_SIZE    10				 // @comm #define FIELD07_SIZE  - 14
#define FIELD08_SIZE    12				 // @comm #define FIELD08_SIZE  - 12
#define FIELD11_SIZE	6                // @comm #define FIELD12_SIZE	- 6
#define FIELD12_SIZE	6                // @comm #define FIELD12_SIZE	- 6
#define FIELD13_SIZE	4                // @comm #define FIELD13_SIZE	- 4
#define FIELD14_SIZE	4                // @comm #define FIELD14_SIZE	- 4
#define FIELD17_SIZE    2    		 	 // @comm #define FIELD17_SIZE  - 2
#define FIELD18_SIZE	4				 // @comm #define FIELD18_SIZE  - 4
#define FIELD22_SIZE	3                // @comm #define FIELD22_SIZE	- 3
#define FIELD24_SIZE	3                // @comm #define FIELD24_SIZE	- 3
#define FIELD23_SIZE	4                // @comm #define FIELD23_SIZE	- 4  // jrd 05212005
#define FIELD25_SIZE	2                // @comm #define FIELD25_SIZE	- 2
#define FIELD26_SIZE    2    		 	 // @comm #define FIELD26_SIZE - 2
#define FIELD27_SIZE    2    		 	 // @comm #define FIELD27_SIZE - 2
#define FIELD28_SIZE    2          		 // @comm #define FIELD28_SIZE - 2
#define FIELD30_SIZE    2    		 	 // @comm #define FIELD30_SIZE - 2
#define FIELD31_SIZE    2    		 	 // @comm #define FIELD31_SIZE - 2
#define FIELD32_SIZE    2    		 	 // @comm #define FIELD32_SIZE - 2
#define FIELD33_SIZE    2    		 	 // @comm #define FIELD33_SIZE - 2
#define FIELD35_SIZE	37               // @comm #define FIELD35_SIZE	- 37
#define FIELD37_SIZE	12               // @comm #define FIELD37_SIZE	- 12
#define FIELD38_SIZE	6                // @comm #define FIELD38_SIZE	- 6
#define FIELD39_SIZE	2                // @comm #define FIELD39_SIZE	- 2
#define FIELD41_SIZE	8                // @comm #define FIELD41_SIZE	- 8
#define FIELD42_SIZE	15               // @comm #define FIELD42_SIZE	- 15
#define FIELD43_SIZE    2    		 	 // @comm #define FIELD43_SIZE - 2
#define FIELD44_SIZE	25               // @comm #define FIELD44_SIZE	- 25
#define FIELD45_SIZE	76               // @comm #define FIELD45_SIZE	- 76
#define FIELD47_SIZE    8    		 	 // @comm #define FIELD48_SIZE - 2
#define FIELD48_SIZE    1000    		 	 // @comm #define FIELD48_SIZE - 42 // ==>1000
#define FIELD52_SIZE    8    		 	 // @comm #define FIELD52_SIZE - 2  // ==>8
#define FIELD53_SIZE    16    		 	 // @comm #define FIELD53_SIZE - 16
#define FIELD54_SIZE	100               // @comm #define FIELD54_SIZE	- 12 // ==>100
#define FIELD55_SIZE    255    		 	 // @comm #define FIELD55_SIZE - 2
#define FIELD56_SIZE    2    		 	 // @comm #define FIELD56_SIZE - 2
#define FIELD60_SIZE	28               // @comm #define FIELD60_SIZE	- 28
#define FIELD61_SIZE	100                // @comm #define FIELD61_SIZE	- 8
#define FIELD62_SIZE	100                // @comm #define FIELD62_SIZE	- 6
#define FIELD63_SIZE	150              // @comm #define FIELD63_SIZE	- 100
#define FIELD64_SIZE	16
#define FIELD66_SIZE	2
#define FIELD70_SIZE	4
#define FIELD74_SIZE	10
#define FIELD75_SIZE	10
#define FIELD76_SIZE	10
#define FIELD77_SIZE	10
#define FIELD78_SIZE	10
#define FIELD79_SIZE	10
#define FIELD80_SIZE	10
#define FIELD81_SIZE	10
#define FIELD86_SIZE	16
#define FIELD87_SIZE	16
#define FIELD88_SIZE	16
#define FIELD89_SIZE	16
#define FIELD90_SIZE	42
#define FIELD97_SIZE	16
#define FIELD118_SIZE	10
#define FIELD119_SIZE	16
#define FIELD128_SIZE	16
#define FIELD57_SIZE	12
#define FIELD15_SIZE	4

